home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / vbcc / machines / amigappc / doc / pasm.doc < prev    next >
Encoding:
Text File  |  1998-02-16  |  29.6 KB  |  2,164 lines

  1. =======================================
  2. Short instruction for pasm beta version
  3. =======================================
  4.  
  5. pasm can currently generate either ELF objects or absolute files.
  6.  
  7. All PowerPC standard instructions are supported: User level-, super-
  8. visor level-, optional-, 32-bit and 64-bit instructions.
  9.  
  10. All 32-bit extended mnemonics are supported and most of the 64-bit
  11. extended mnemonics.
  12.  
  13.  
  14.  
  15. ASSEMBLER OPTIONS
  16. =================
  17.  
  18. Usage:
  19.  
  20. pasm [?][-V][-o <file>][-I <path>][-D <sym>[=<exp>]][-w][-x][-R][-X]
  21.      [-F <n>][-B <addr>][-m64|s|o][-O <level>] <file>
  22.  
  23. <file>           PowerPC source text to assemble.
  24.  
  25. -V               Print version identification and build string. Example:
  26.                  pasm V0.69 (Amiga OS/M68k)  (c)1997-98 by Frank Wille
  27.                  build date: Jan  2 1998, 11:51:47
  28.  
  29. -o <file>        Set output file name. If not specified, pasm will use
  30.                  the name of the source text and replaces the extension
  31.                  by ".o".
  32.  
  33. -I <path>        Add another include file path. Example:
  34.                  -IWork:PPCIncludes  or  -I /usr/local/include
  35.  
  36. -D <sym>[=<exp>] Define a symbol. <exp> defaults to '1'.
  37.  
  38. -w               Suppress all warning messages.
  39.  
  40. -x               Undefined symbols are automatically defined as
  41.                  external symbols.
  42.  
  43. -R               Don't predefine register symbols r0-r31, f0-f31, cr0-c7,
  44.                  xer, eq, etc.
  45.  
  46. -X               No extended mnemonics. This means you will have to
  47.                  write "bc 12,2,label" instead "beq label". All pre-
  48.                  defined extened mnemonics are listed in the section
  49.                  EXTENDED MNEMONICS.
  50.  
  51. -F <n>           Set output file format.
  52.                  n=0: Absolute, raw format. Base address defaults to
  53.                       zero, but may be changed by "-B addr".
  54.                  n=1: ELF-32bit-PowerPC object.
  55.                  n=2: EHF object. Only used under AmigaOS with WarpOS
  56.                       extension from Haage&Partner.
  57.                  n=3: ADOS object. The difference between ADOS and and EHF
  58.                       is, that ADOS uses HUNK_CODE instead HUNK_PPC_CODE
  59.                       and doesn't support any PPC-specific relocations and
  60.                       references types. This makes it possible to link
  61.                       simple PowerPC programs with an old linker, like
  62.                       BLink, SLink or PhxLnk.
  63.  
  64. -B <address>     Set base address for absolute output format.
  65.  
  66. -m64             Enable 64-bit instructions.
  67.  
  68. -ms              Enable supervisor instructions.
  69.  
  70. -mo              Enable optional instructions.
  71.  
  72. -O <level>       Set optimization level. <level> contains 32 flags to
  73.                  enable different optimizations and features. Currently
  74.                  used are:
  75.                  0x00010000: Automatic correction of far branches. A
  76.                              "Bcc label" with label out of range (more
  77.                              than 32764 bytes away) will be converted
  78.                              into a "B!cc $+8 / B label" combination.
  79.  
  80.  
  81.  
  82. DIRECTIVES
  83. ==========
  84.  
  85.  
  86. .ascii <exp1>[,<exp2>,"<string1>"...]
  87. ----------------------------------
  88. See ".byte".
  89.  
  90.  
  91. .asciiz "<string1>"[,"<string2>"...]
  92. ------------------------------------
  93. See ".string".
  94.  
  95.  
  96. .align <bit_count>
  97. ------------------
  98. Insert as much zero bytes as required to reach an address where
  99. <bit_count> low order bits are zero. For example ".align 2" would
  100. make an alignment to the next 32-bit boundary.
  101.  
  102.  
  103. .baserel <section>,<base_reg>
  104. -----------------------------
  105. Allow base relative access via register <base_reg> in the section
  106. called <section>. In absolute mode, <base_reg> must be initialized
  107. with an address pointing 32764 bytes behind the start address of
  108. this section. In EHF, <base_reg> must be initialized with the linker
  109. symbol _LinkerDB. In ELF/SystemV ABI small data or TOC addressing
  110. is not supported. (?)
  111.  
  112. By default, base relative access via r2 (rtoc) on the section
  113. ".tocd" is set.
  114.  
  115.  
  116. .bss <symbol>,<size>[,<alignment>]
  117. ----------------------------------
  118. Allocate <size> bytes of space in the .bss section and assign
  119. the value to that location to <symbol>. If <alignment> is given,
  120. then the space will be aligned to an address having <alignment>
  121. low zero bits or 2, whichever is greater.
  122. <symbol> may be made globally visible by the .globl directive.
  123.  
  124.  
  125. .byte <exp1>[,<exp2>,"<string1>"...]
  126. ------------------------------------
  127. Assign the integer or string constant operands into successive
  128. bytes of memory in the current section. Any combination of integer
  129. and character string constant operands is permitted.
  130.  
  131.  
  132. .comm <symbol>,<size>
  133. ---------------------
  134. Allocate <size> bytes of space in the .bss section and assign
  135. the value to that location to <symbol>. <symbol> is always made
  136. globally visible. ".comm"-areas of less than 8 bytes in size are
  137. aligned to word boundaries, otherwise to doubleword boundaries.
  138.  
  139.  
  140. .double <float1>[,<float2>...]
  141. ------------------------------
  142. If the current section location counter is not on a doubleword
  143. boundary advance it to the next doubleword boundary. Then assign
  144. the values of the operands as IEEE 754 double-precision 64-bit
  145. format numbers to successive doublewords of memory in the current
  146. section.
  147.  
  148.  
  149. .else
  150. -----
  151. Begins the "else"-part in a block of conditional assembly.
  152.  
  153.  
  154. .endif
  155. ------
  156. Ends a block of conditional assembly.
  157.  
  158.  
  159. .endm
  160. -----
  161. Ends a macro definition.
  162.  
  163.  
  164. .extern <symbol>
  165. ----------------
  166. See ".globl".
  167.  
  168.  
  169. .fail
  170. -----
  171. Abort assembly with displaying the error message "fail directive
  172. encountered".
  173.  
  174.  
  175. .file "<file name>"
  176. -------------------
  177. Specify the source file name, which is included into the object
  178. file as a symbol of type "FILE" with local binding.
  179.  
  180.  
  181. .float <float1>[,<float2>...]
  182. -----------------------------
  183. If the current section location counter is not on a word boundary
  184. advance it to the next word boundary. Then assign the values of the
  185. operands as IEEE 754 single precision 32-bit format numbers to
  186. successive words of memory in the current section.
  187.  
  188.  
  189. .global <symbol>
  190. ----------------
  191. See ".globl".
  192.  
  193.  
  194. .globl <symbol>
  195. ---------------
  196. Flag <symbol> as an external symbol, which means that <symbol> is
  197. visible to all modules in the linking process. It may be either
  198. defined or undefined.
  199.  
  200.  
  201. .half <exp1>[,<exp2>...]
  202. ------------------------
  203. If the current section location counter is not on a halfword
  204. boundary, advance it to the next halfword boundary. Then, assign
  205. the values of the operands into successive halfwords of memory in
  206. the current section.
  207.  
  208.  
  209. .ident "<string>"
  210. -----------------
  211. Place an indentification string into the .comment section (ELF)
  212. or use it as object unit title (EHF).
  213.  
  214.  
  215. .if<cond> <exp>
  216. ---------------
  217. The following block will only be assembled, if the condition <cond>
  218. is valid for the expression <exp>. Available conditions are:
  219. .if     assemble, if <exp> is not zero.
  220. .ifeq   assemble, if <exp> is zero.
  221. .ifne   assemble, if <exp> is not zero.
  222. .ifgt   assemble, if <exp> is greater than zero.
  223. .ifge   assemble, if <exp> is greater than zero or equal (positive).
  224. .iflt   assemble, if <exp> is less than zero (negative).
  225. .ifle   assemble, if <exp> is less than zero or equal.
  226. .ifdef  assemble, if <exp> is defined.
  227. .ifndef assemble, if <exp> is undefined.
  228.  
  229. A block of conditional assembly is ended by ".endif". A maximum of
  230. eight if-levels is allowed.
  231.  
  232.  
  233. .include <file name>
  234. --------------------
  235. Includes another source text. Besides the current directory, all
  236. include paths, defined by the -I option, are searched.
  237.  
  238.  
  239. .lcomm <symbol>,<size>[,<alignment>]
  240. ------------------------------------
  241. See ".bss".
  242.  
  243.  
  244. .local <symbol>
  245. ---------------
  246. Explicitely declare symbol to have local binding. It is not
  247. visible outside the object file containing its definition.
  248. <symbol> must be known (ELF only).
  249.  
  250.  
  251. .long <exp1>[,<exp2>...]
  252. ------------------------
  253. See ".word".
  254.  
  255.  
  256. .macro <name>
  257. -------------
  258. Define a new macro, called <name>. Macro parameters can be acces-
  259. sed by \1 to \9. \0 is reserved for the branch hint. Example:
  260.  
  261. .macro  bdz
  262.         bc\0   18,0,\1
  263. .endm
  264.  
  265. \@ will be replaced by a unique number on every macro invocation
  266. and should be used when defining labels in a macro.
  267.  
  268.  
  269. .newsection <name>[,"<attributes>"]
  270. -----------------------------------
  271. This directives differs from the normal .section directive in the
  272. case if a section called <name> already exists. .newsection will
  273. then force the start of a new section with the same name and
  274. effectively ends any further definition for the earlier section.
  275. For the rest, see ".section".
  276.  
  277.  
  278. .section <name>[,"<attributes>"]
  279. --------------------------------
  280. Starts a new section named <name> or reactivate an old one. If
  281. attributes are given for an already existing section, they must
  282. match exactly. The section's name will also be defined as a new
  283. symbol, which represents the section's start address.
  284.  
  285. The "<attributes>" string may consist of the following characters:
  286.  
  287. Section Contents:
  288. c - section has code
  289. d - section has initialized data
  290. u - section has uninitialized data
  291. i - section has directives (info section)
  292. n - section can be discarded
  293. R - remove section at link time
  294.  
  295. Section Protection:
  296. r - section is readable
  297. w - section is writable
  298. x - section is executable
  299. s - section is sharable
  300.  
  301. Section Alignment (only one):
  302. 0 - align to byte boundary
  303. 1 - align to halfword boundary
  304. 2 - align to word boundary
  305. 3 - align to doubleword boundary
  306. 4 - align to quadword boundary
  307. 5 - align to 32 byte boundary
  308. 6 - align to 64 byte boundary
  309.  
  310.  
  311. .set <symbol>,<expression>
  312. --------------------------
  313. Create a new program symbol with the name <symbol> and assign to it
  314. the value of <expression>. If <symbol> is already assigned, it will
  315. contain a new value from now on. If <expression> is undefined in
  316. pass 1 (because symbols in it are defined some lines later) it will
  317. get a default value of '1', which is changed in pass 2 to the
  318. correct value. So it is visible for .ifdef, etc.
  319.  
  320.  
  321. .size <symbol>,<size>
  322. ---------------------
  323. Set the size in bytes of an object defined at <symbol>.
  324.  
  325.  
  326. .short <exp1>[,<exp2>...]
  327. -------------------------
  328. See ".half".
  329.  
  330.  
  331. .space <exp>
  332. ------------
  333. Insert <exp> zero bytes into the current section.
  334.  
  335.  
  336. .string "<string1>"[,"<string2>"...]
  337. ------------------------------------
  338. Assign the characters in each string along with a final zero byte
  339. to successive memory locations in the current section.
  340.  
  341.  
  342. .type <symbol>,<type>
  343. ---------------------
  344. Set type of symbol called <symbol> to <type>, which must be one of:
  345. 1: Object
  346. 2: Function
  347. 3: Section
  348. 4: File
  349.  
  350. The predefined symbols @object and @function are available for
  351. this purpose.
  352.  
  353.  
  354. .uadouble <float1>[,<float2>...]
  355. --------------------------------
  356. Assign the values of the operands as IEEE 754 double-precision 64-
  357. bit format numbers to successive eight-byte areas of memory in the
  358. current section regardless of section alignment.
  359.  
  360.  
  361. .uafloat <float1>[,<float2>...]
  362. -------------------------------
  363. Assign the values of the operands as IEEE 754 single precision 32-
  364. bit format numbers to successive 4-byte areas of memory in the
  365. current section regardless of section alignment.
  366.  
  367.  
  368. .uahalf <exp1>[,<exp2>...]
  369. --------------------------
  370. Assign the values of the operands into successive two byte areas of
  371. memory in the current section regardless of section alignment.
  372.  
  373.  
  374. .ualong <exp1>[,<exp2>...]
  375. --------------------------
  376. See ".uaword".
  377.  
  378.  
  379. .uashort <exp1>[,<exp2>...]
  380. ---------------------------
  381. See ".uahalf".
  382.  
  383.  
  384. .uaword <exp1>[,<exp2>...]
  385. --------------------------
  386. Assign the values of the operands into successive four-byte areas
  387. of memory in the current section regardless of section alignment.
  388.  
  389.  
  390. .word <exp1>[,<exp2>...]
  391. ------------------------
  392. If the current section location counter is not on a word boundary
  393. advance it to the next word boundary. Then assign the values of the
  394. operands into successive words of memory in the current section.
  395.  
  396.  
  397.  
  398. PREDEFINED SYMBOLS
  399. ==================
  400.  
  401. There are two symbols, which are always updated by the assembler.
  402.  
  403. $       Current address counter value.
  404.  
  405. $NARG   Number of macro arguments during macro execution.
  406.         It is zero, when outside of a macro.
  407.  
  408. The following symbols are constant and may be deactivated by
  409. specifying the -R option.
  410.  
  411.         .set r0,0
  412.         .set r1,1
  413.         .set r2,2
  414.         .set r3,3
  415.         .set r4,4
  416.         .set r5,5
  417.         .set r6,6
  418.         .set r7,7
  419.         .set r8,8
  420.         .set r9,9
  421.         .set r10,10
  422.         .set r11,11
  423.         .set r12,12
  424.         .set r13,13
  425.         .set r14,14
  426.         .set r15,15
  427.         .set r16,16
  428.         .set r17,17
  429.         .set r18,18
  430.         .set r19,19
  431.         .set r20,20
  432.         .set r21,21
  433.         .set r22,22
  434.         .set r23,23
  435.         .set r24,24
  436.         .set r25,25
  437.         .set r26,26
  438.         .set r27,27
  439.         .set r28,28
  440.         .set r29,29
  441.         .set r30,30
  442.         .set r31,31
  443.         .set f0,0
  444.         .set f1,1
  445.         .set f2,2
  446.         .set f3,3
  447.         .set f4,4
  448.         .set f5,5
  449.         .set f6,6
  450.         .set f7,7
  451.         .set f8,8
  452.         .set f9,9
  453.         .set f10,10
  454.         .set f11,11
  455.         .set f12,12
  456.         .set f13,13
  457.         .set f14,14
  458.         .set f15,15
  459.         .set f16,16
  460.         .set f17,17
  461.         .set f18,18
  462.         .set f19,19
  463.         .set f20,20
  464.         .set f21,21
  465.         .set f22,22
  466.         .set f23,23
  467.         .set f24,24
  468.         .set f25,25
  469.         .set f26,26
  470.         .set f27,27
  471.         .set f28,28
  472.         .set f29,29
  473.         .set f30,30
  474.         .set f31,31
  475.         .set cr0,0
  476.         .set cr1,1
  477.         .set cr2,2
  478.         .set cr3,3
  479.         .set cr4,4
  480.         .set cr5,5
  481.         .set cr6,6
  482.         .set cr7,7
  483.         .set lt,0
  484.         .set gt,1
  485.         .set eq,2
  486.         .set so,3
  487.         .set un,3
  488.         .set sp,1
  489.         .set rtoc,2
  490.         .set fp,31
  491.         .set fpscr,0
  492.         .set xer,1
  493.         .set lr,8
  494.         .set ctr,9
  495.  
  496.  
  497.  
  498. PREDEFINED SECTIONS
  499. ===================
  500.         .section .text,"crx3"
  501.         .section .data,"drw3"
  502.         .section .bss,"urw3"
  503.         .section .rodata,"dr3"
  504.         .section .tocd,"drw3"
  505.  
  506.  
  507.  
  508. EXTENDED MNEMONICS
  509. ==================
  510.  
  511. There is a huge set of extended mnemonics, proposed by Motorola
  512. and IBM in the "PowerPC Programming Environments", to make the
  513. programmer's life easier. Except for some 64-bit mnemonics (I only
  514. downloaded the 32-bit manuals for now), pasm supports them all.
  515.  
  516. Currently all extended mnemonics (except "la") are implemented
  517. as macros and can be deactivated with the -X option.
  518.  
  519.  
  520. List of extended mnemonics
  521. --------------------------
  522. .macro subi
  523.  addi \1,\2,-(\3)
  524. .endm
  525.  
  526. .macro subis
  527.  addis \1,\2,-(\3)
  528. .endm
  529.  
  530. .macro subic
  531.  addic \1,\2,-(\3)
  532. .endm
  533.  
  534. .macro subic.
  535.  addic. \1,\2,-(\3)
  536. .endm
  537.  
  538. .macro sub
  539.  subf \1,\3,\2
  540. .endm
  541.  
  542. .macro sub.
  543.  subf. \1,\3,\2
  544. .endm
  545.  
  546. .macro subo
  547.  subfo \1,\3,\2
  548. .endm
  549.  
  550. .macro subo.
  551.  subfo. \1,\3,\2
  552. .endm
  553.  
  554. .macro subc
  555.  subfc \1,\3,\2
  556. .endm
  557.  
  558. .macro subc.
  559.  subfc. \1,\3,\2
  560. .endm
  561.  
  562. .macro subco
  563.  subfco \1,\3,\2
  564. .endm
  565.  
  566. .macro subco.
  567.  subfco. \1,\3,\2
  568. .endm
  569.  
  570. .macro cmpwi
  571. .ifeq $NARG-2
  572.  cmpi 0,0,\1,\2
  573. .else
  574.  cmpi \1,0,\2,\3
  575. .endif
  576. .endm
  577.  
  578. .macro cmpw
  579. .ifeq $NARG-2
  580.  cmp 0,0,\1,\2
  581. .else
  582.  cmp \1,0,\2,\3
  583. .endif
  584. .endm
  585.  
  586. .macro cmplwi
  587. .ifeq $NARG-2
  588.  cmpli 0,0,\1,\2
  589. .else
  590.  cmpli \1,0,\2,\3
  591. .endif
  592. .endm
  593.  
  594. .macro cmplw
  595. .ifeq $NARG-2
  596.  cmpl 0,0,\1,\2
  597. .else
  598.  cmpl \1,0,\2,\3
  599. .endif
  600. .endm
  601.  
  602. .macro cmpdi
  603. .ifeq $NARG-2
  604.  cmpi 0,1,\1,\2
  605. .else
  606.  cmpi \1,1,\2,\3
  607. .endif
  608. .endm
  609.  
  610. .macro cmpd
  611. .ifeq $NARG-2
  612.  cmp 0,1,\1,\2
  613. .else
  614.  cmp \1,1,\2,\3
  615. .endif
  616. .endm
  617.  
  618. .macro cmpldi
  619. .ifeq $NARG-2
  620.  cmpli 0,1,\1,\2
  621. .else
  622.  cmpli \1,1,\2,\3
  623. .endif
  624. .endm
  625.  
  626. .macro cmpld
  627. .ifeq $NARG-2
  628.  cmpl 0,1,\1,\2
  629. .else
  630.  cmpl \1,1,\2,\3
  631. .endif
  632. .endm
  633.  
  634.  
  635. .macro extlwi
  636.  rlwinm \1,\2,\4,0,(\3)-1
  637. .endm
  638.  
  639. .macro extlwi.
  640.  rlwinm. \1,\2,\4,0,(\3)-1
  641. .endm
  642.  
  643. .macro extrwi
  644.  rlwinm \1,\2,(\4)+(\3),32-(\3),31
  645. .endm
  646.  
  647. .macro extrwi.
  648.  rlwinm. \1,\2,(\4)+(\3),32-(\3),31
  649. .endm
  650.  
  651. .macro inslwi
  652.  rlwimi \1,\2,32-(\4),\4,((\4)+(\3))-1
  653. .endm
  654.  
  655. .macro inslwi.
  656.  rlwimi. \1,\2,32-(\4),\4,((\4)+(\3))-1
  657. .endm
  658.  
  659. .macro insrwi
  660.  rlwimi \1,\2,32-((\4)+(\3)),\4,((\4)+(\3))-1
  661. .endm
  662.  
  663. .macro insrwi.
  664.  rlwimi. \1,\2,32-((\4)+(\3)),\4,((\4)+(\3))-1
  665. .endm
  666.  
  667. .macro rotlwi
  668.  rlwinm \1,\2,\3,0,31
  669. .endm
  670.  
  671. .macro rotlwi.
  672.  rlwinm. \1,\2,\3,0,31
  673. .endm
  674.  
  675. .macro rotrwi
  676.  rlwinm \1,\2,32-(\3),0,31
  677. .endm
  678.  
  679. .macro rotrwi.
  680.  rlwinm. \1,\2,32-(\3),0,31
  681. .endm
  682.  
  683. .macro rotlw
  684.  rlwnm \1,\2,\3,0,31
  685. .endm
  686.  
  687. .macro rotlw.
  688.  rlwnm. \1,\2,\3,0,31
  689. .endm
  690.  
  691. .macro slwi
  692.  rlwinm \1,\2,\3,0,31-(\3)
  693. .endm
  694.  
  695. .macro slwi.
  696.  rlwinm. \1,\2,\3,0,31-(\3)
  697. .endm
  698.  
  699. .macro srwi
  700.  rlwinm \1,\2,32-(\3),\3,31
  701. .endm
  702.  
  703. .macro srwi.
  704.  rlwinm. \1,\2,32-(\3),\3,31
  705. .endm
  706.  
  707. .macro clrlwi
  708.  rlwinm \1,\2,0,\3,31
  709. .endm
  710.  
  711. .macro clrlwi.
  712.  rlwinm. \1,\2,0,\3,31
  713. .endm
  714.  
  715. .macro clrrwi
  716.  rlwinm \1,\2,0,0,31-(\3)
  717. .endm
  718.  
  719. .macro clrrwi.
  720.  rlwinm. \1,\2,0,0,31-(\3)
  721. .endm
  722.  
  723. .macro clrlslwi
  724.  rlwinm \1,\2,\4,(\3)-(\4),31-(\4)
  725. .endm
  726.  
  727. .macro clrlslwi.
  728.  rlwinm. \1,\2,\4,(\3)-(\4),31-(\4)
  729. .endm
  730.  
  731.  
  732. .macro bt
  733.  bc\0 12,\1,\2
  734. .endm
  735.  
  736. .macro bf
  737.  bc\0 4,\1,\2
  738. .endm
  739.  
  740. .macro bdnz
  741.  bc\0 16,0,\1
  742. .endm
  743.  
  744. .macro bdnzt
  745.  bc\0 8,\1,\2
  746. .endm
  747.  
  748. .macro bdnzf
  749.  bc\0 0,\1,\2
  750. .endm
  751.  
  752. .macro bdz
  753.  bc\0 18,0,\1
  754. .endm
  755.  
  756. .macro bdzt
  757.  bc\0 10,\1,\2
  758. .endm
  759.  
  760. .macro bdzf
  761.  bc\0 2,\1,\2
  762. .endm
  763.  
  764. .macro bta
  765.  bca\0 12,\1,\2
  766. .endm
  767.  
  768. .macro bfa
  769.  bca\0 4,\1,\2
  770. .endm
  771.  
  772. .macro bdnza
  773.  bca\0 16,0,\1
  774. .endm
  775.  
  776. .macro bdnzta
  777.  bca\0 8,\1,\2
  778. .endm
  779.  
  780. .macro bdnzfa
  781.  bca\0 0,\1,\2
  782. .endm
  783.  
  784. .macro bdza
  785.  bca\0 18,0,\1
  786. .endm
  787.  
  788. .macro bdzta
  789.  bca\0 10,\1,\2
  790. .endm
  791.  
  792. .macro bdzfa
  793.  bca\0 2,\1,\2
  794. .endm
  795.  
  796. .macro blr
  797.  bclr 20,0
  798. .endm
  799.  
  800. .macro btlr
  801.  bclr\0 12,\1
  802. .endm
  803.  
  804. .macro bflr
  805.  bclr\0 4,\1
  806. .endm
  807.  
  808. .macro bdnzlr
  809.  bclr\0 16,0
  810. .endm
  811.  
  812. .macro bdnztlr
  813.  bclr\0 8,\1
  814. .endm
  815.  
  816. .macro bdnzflr
  817.  bclr\0 0,\1
  818. .endm
  819.  
  820. .macro bdzlr
  821.  bclr\0 18,0
  822. .endm
  823.  
  824. .macro bdztlr
  825.  bclr\0 10,\1
  826. .endm
  827.  
  828. .macro bdzflr
  829.  bclr\0 2,\1
  830. .endm
  831.  
  832. .macro bctr
  833.  bcctr 20,0
  834. .endm
  835.  
  836. .macro btctr
  837.  bcctr\0 12,\1
  838. .endm
  839.  
  840. .macro bfctr
  841.  bcctr\0 4,\1
  842. .endm
  843.  
  844. .macro btl
  845.  bcl\0 12,\1,\2
  846. .endm
  847.  
  848. .macro bfl
  849.  bcl\0 4,\1,\2
  850. .endm
  851.  
  852. .macro bdnzl
  853.  bcl\0 16,0,\1
  854. .endm
  855.  
  856. .macro bdnztl
  857.  bcl\0 8,\1,\2
  858. .endm
  859.  
  860. .macro bdnzfl
  861.  bcl\0 0,\1,\2
  862. .endm
  863.  
  864. .macro bdzl
  865.  bcl\0 18,0,\1
  866. .endm
  867.  
  868. .macro bdztl
  869.  bcl\0 10,\1,\2
  870. .endm
  871.  
  872. .macro bdzfl
  873.  bcl\0 2,\1,\2
  874. .endm
  875.  
  876. .macro btla
  877.  bcla\0 12,\1,\2
  878. .endm
  879.  
  880. .macro bfla
  881.  bcla\0 4,\1,\2
  882. .endm
  883.  
  884. .macro bdnzla
  885.  bcla\0 16,0,\1
  886. .endm
  887.  
  888. .macro bdnztla
  889.  bcla\0 8,\1,\2
  890. .endm
  891.  
  892. .macro bdnzfla
  893.  bcla\0 0,\1,\2
  894. .endm
  895.  
  896. .macro bdzla
  897.  bcla\0 18,0,\1
  898. .endm
  899.  
  900. .macro bdztla
  901.  bcla\0 10,\1,\2
  902. .endm
  903.  
  904. .macro bdzfla
  905.  bcla\0 2,\1,\2
  906. .endm
  907.  
  908. .macro blrl
  909.  bclrl 20,0
  910. .endm
  911.  
  912. .macro btlrl
  913.  bclrl\0 12,\1
  914. .endm
  915.  
  916. .macro bflrl
  917.  bclrl\0 4,\1
  918. .endm
  919.  
  920. .macro bdnzlrl
  921.  bclrl\0 16,0
  922. .endm
  923.  
  924. .macro bdnztlrl
  925.  bclrl\0 8,\1
  926. .endm
  927.  
  928. .macro bdnzflrl
  929.  bclrl\0 0,\1
  930. .endm
  931.  
  932. .macro bdzlrl
  933.  bclrl\0 18,0
  934. .endm
  935.  
  936. .macro bdztlrl
  937.  bclrl\0 10,\1
  938. .endm
  939.  
  940. .macro bdzflrl
  941.  bclrl\0 2,\1
  942. .endm
  943.  
  944. .macro bctrl
  945.  bcctrl 20,0
  946. .endm
  947.  
  948. .macro btctrl
  949.  bcctrl\0 12,\1
  950. .endm
  951.  
  952. .macro bfctrl
  953.  bcctrl\0 4,\1
  954. .endm
  955.  
  956.  
  957. .macro blt
  958. .ifeq $NARG-1
  959.  bc\0 12,0,\1
  960. .else
  961.  bc\0 12,4*(\1)+0,\2
  962. .endif
  963. .endm
  964.  
  965. .macro ble
  966. .ifeq $NARG-1
  967.  bc\0 4,1,\1
  968. .else
  969.  bc\0 4,4*(\1)+1,\2
  970. .endif
  971. .endm
  972.  
  973. .macro beq
  974. .ifeq $NARG-1
  975.  bc\0 12,2,\1
  976. .else
  977.  bc\0 12,4*(\1)+2,\2
  978. .endif
  979. .endm
  980.  
  981. .macro bge
  982. .ifeq $NARG-1
  983.  bc\0 4,0,\1
  984. .else
  985.  bc\0 4,4*(\1)+0,\2
  986. .endif
  987. .endm
  988.  
  989. .macro bgt
  990. .ifeq $NARG-1
  991.  bc\0 12,1,\1
  992. .else
  993.  bc\0 12,4*(\1)+1,\2
  994. .endif
  995. .endm
  996.  
  997. .macro bnl
  998. .ifeq $NARG-1
  999.  bc\0 4,0,\1
  1000. .else
  1001.  bc\0 4,4*(\1)+0,\2
  1002. .endif
  1003. .endm
  1004.  
  1005. .macro bne
  1006. .ifeq $NARG-1
  1007.  bc\0 4,2,\1
  1008. .else
  1009.  bc\0 4,4*(\1)+2,\2
  1010. .endif
  1011. .endm
  1012.  
  1013. .macro bng
  1014. .ifeq $NARG-1
  1015.  bc\0 4,1,\1
  1016. .else
  1017.  bc\0 4,4*(\1)+1,\2
  1018. .endif
  1019. .endm
  1020.  
  1021. .macro bso
  1022. .ifeq $NARG-1
  1023.  bc\0 12,3,\1
  1024. .else
  1025.  bc\0 12,4*(\1)+3,\2
  1026. .endif
  1027. .endm
  1028.  
  1029. .macro bns
  1030. .ifeq $NARG-1
  1031.  bc\0 4,3,\1
  1032. .else
  1033.  bc\0 4,4*(\1)+3,\2
  1034. .endif
  1035. .endm
  1036.  
  1037. .macro bun
  1038. .ifeq $NARG-1
  1039.  bc\0 12,3,\1
  1040. .else
  1041.  bc\0 12,4*(\1)+3,\2
  1042. .endif
  1043. .endm
  1044.  
  1045. .macro bnu
  1046. .ifeq $NARG-1
  1047.  bc\0 4,3,\1
  1048. .else
  1049.  bc\0 4,4*(\1)+3,\2
  1050. .endif
  1051. .endm
  1052.  
  1053. .macro blta
  1054. .ifeq $NARG-1
  1055.  bca\0 12,0,\1
  1056. .else
  1057.  bca\0 12,4*(\1)+0,\2
  1058. .endif
  1059. .endm
  1060.  
  1061. .macro blea
  1062. .ifeq $NARG-1
  1063.  bca\0 4,1,\1
  1064. .else
  1065.  bca\0 4,4*(\1)+1,\2
  1066. .endif
  1067. .endm
  1068.  
  1069. .macro beqa
  1070. .ifeq $NARG-1
  1071.  bca\0 12,2,\1
  1072. .else
  1073.  bca\0 12,4*(\1)+2,\2
  1074. .endif
  1075. .endm
  1076.  
  1077. .macro bgea
  1078. .ifeq $NARG-1
  1079.  bca\0 4,0,\1
  1080. .else
  1081.  bca\0 4,4*(\1)+0,\2
  1082. .endif
  1083. .endm
  1084.  
  1085. .macro bgta
  1086. .ifeq $NARG-1
  1087.  bca\0 12,1,\1
  1088. .else
  1089.  bca\0 12,4*(\1)+1,\2
  1090. .endif
  1091. .endm
  1092.  
  1093. .macro bnla
  1094. .ifeq $NARG-1
  1095.  bca\0 4,0,\1
  1096. .else
  1097.  bca\0 4,4*(\1)+0,\2
  1098. .endif
  1099. .endm
  1100.  
  1101. .macro bnea
  1102. .ifeq $NARG-1
  1103.  bca\0 4,2,\1
  1104. .else
  1105.  bca\0 4,4*(\1)+2,\2
  1106. .endif
  1107. .endm
  1108.  
  1109. .macro bnga
  1110. .ifeq $NARG-1
  1111.  bca\0 4,1,\1
  1112. .else
  1113.  bca\0 4,4*(\1)+1,\2
  1114. .endif
  1115. .endm
  1116.  
  1117. .macro bsoa
  1118. .ifeq $NARG-1
  1119.  bca\0 12,3,\1
  1120. .else
  1121.  bca\0 12,4*(\1)+3,\2
  1122. .endif
  1123. .endm
  1124.  
  1125. .macro bnsa
  1126. .ifeq $NARG-1
  1127.  bca\0 4,3,\1
  1128. .else
  1129.  bca\0 4,4*(\1)+3,\2
  1130. .endif
  1131. .endm
  1132.  
  1133. .macro buna
  1134. .ifeq $NARG-1
  1135.  bca\0 12,3,\1
  1136. .else
  1137.  bca\0 12,4*(\1)+3,\2
  1138. .endif
  1139. .endm
  1140.  
  1141. .macro bnua
  1142. .ifeq $NARG-1
  1143.  bca\0 4,3,\1
  1144. .else
  1145.  bca\0 4,4*(\1)+3,\2
  1146. .endif
  1147. .endm
  1148.  
  1149.  
  1150. .macro bltlr
  1151. .ifeq $NARG-1
  1152.  bclr\0 12,4*(\1)+0
  1153. .else
  1154.  bclr\0 12,0
  1155. .endif
  1156. .endm
  1157.  
  1158. .macro blelr
  1159. .ifeq $NARG-1
  1160.  bclr\0 4,4*(\1)+1
  1161. .else
  1162.  bclr\0 4,1
  1163. .endif
  1164. .endm
  1165.  
  1166. .macro beqlr
  1167. .ifeq $NARG-1
  1168.  bclr\0 12,4*(\1)+2
  1169. .else
  1170.  bclr\0 12,2
  1171. .endif
  1172. .endm
  1173.  
  1174. .macro bgelr
  1175. .ifeq $NARG-1
  1176.  bclr\0 4,4*(\1)+0
  1177. .else
  1178.  bclr\0 4,0
  1179. .endif
  1180. .endm
  1181.  
  1182. .macro bgtlr
  1183. .ifeq $NARG-1
  1184.  bclr\0 12,4*(\1)+1
  1185. .else
  1186.  bclr\0 12,1
  1187. .endif
  1188. .endm
  1189.  
  1190. .macro bnllr
  1191. .ifeq $NARG-1
  1192.  bclr\0 4,4*(\1)+0
  1193. .else
  1194.  bclr\0 4,0
  1195. .endif
  1196. .endm
  1197.  
  1198. .macro bnelr
  1199. .ifeq $NARG-1
  1200.  bclr\0 4,4*(\1)+2
  1201. .else
  1202.  bclr\0 4,2
  1203. .endif
  1204. .endm
  1205.  
  1206. .macro bnglr
  1207. .ifeq $NARG-1
  1208.  bclr\0 4,4*(\1)+1
  1209. .else
  1210.  bclr\0 4,1
  1211. .endif
  1212. .endm
  1213.  
  1214. .macro bsolr
  1215. .ifeq $NARG-1
  1216.  bclr\0 12,4*(\1)+3
  1217. .else
  1218.  bclr\0 12,3
  1219. .endif
  1220. .endm
  1221.  
  1222. .macro bnslr
  1223. .ifeq $NARG-1
  1224.  bclr\0 4,4*(\1)+3
  1225. .else
  1226.  bclr\0 4,3
  1227. .endif
  1228. .endm
  1229.  
  1230. .macro bunlr
  1231. .ifeq $NARG-1
  1232.  bclr\0 12,4*(\1)+3
  1233. .else
  1234.  bclr\0 12,3
  1235. .endif
  1236. .endm
  1237.  
  1238. .macro bnulr
  1239. .ifeq $NARG-1
  1240.  bclr\0 4,4*(\1)+3
  1241. .else
  1242.  bclr\0 4,3
  1243. .endif
  1244. .endm
  1245.  
  1246. .macro bltctr
  1247. .ifeq $NARG-1
  1248.  bcctr\0 12,4*(\1)+0
  1249. .else
  1250.  bcctr\0 12,0
  1251. .endif
  1252. .endm
  1253.  
  1254. .macro blectr
  1255. .ifeq $NARG-1
  1256.  bcctr\0 4,4*(\1)+1
  1257. .else
  1258.  bcctr\0 4,1
  1259. .endif
  1260. .endm
  1261.  
  1262. .macro beqctr
  1263. .ifeq $NARG-1
  1264.  bcctr\0 12,4*(\1)+2
  1265. .else
  1266.  bcctr\0 12,2
  1267. .endif
  1268. .endm
  1269.  
  1270. .macro bgectr
  1271. .ifeq $NARG-1
  1272.  bcctr\0 4,4*(\1)+0
  1273. .else
  1274.  bcctr\0 4,0
  1275. .endif
  1276. .endm
  1277.  
  1278. .macro bgtctr
  1279. .ifeq $NARG-1
  1280.  bcctr\0 12,4*(\1)+1
  1281. .else
  1282.  bcctr\0 12,1
  1283. .endif
  1284. .endm
  1285.  
  1286. .macro bnlctr
  1287. .ifeq $NARG-1
  1288.  bcctr\0 4,4*(\1)+0
  1289. .else
  1290.  bcctr\0 4,0
  1291. .endif
  1292. .endm
  1293.  
  1294. .macro bnectr
  1295. .ifeq $NARG-1
  1296.  bcctr\0 4,4*(\1)+2
  1297. .else
  1298.  bcctr\0 4,2
  1299. .endif
  1300. .endm
  1301.  
  1302. .macro bngctr
  1303. .ifeq $NARG-1
  1304.  bcctr\0 4,4*(\1)+1
  1305. .else
  1306.  bcctr\0 4,1
  1307. .endif
  1308. .endm
  1309.  
  1310. .macro bsoctr
  1311. .ifeq $NARG-1
  1312.  bcctr\0 12,4*(\1)+3
  1313. .else
  1314.  bcctr\0 12,3
  1315. .endif
  1316. .endm
  1317.  
  1318. .macro bnsctr
  1319. .ifeq $NARG-1
  1320.  bcctr\0 4,4*(\1)+3
  1321. .else
  1322.  bcctr\0 4,3
  1323. .endif
  1324. .endm
  1325.  
  1326. .macro bunctr
  1327. .ifeq $NARG-1
  1328.  bcctr\0 12,4*(\1)+3
  1329. .else
  1330.  bcctr\0 12,3
  1331. .endif
  1332. .endm
  1333.  
  1334. .macro bnuctr
  1335. .ifeq $NARG-1
  1336.  bcctr\0 4,4*(\1)+3
  1337. .else
  1338.  bcctr\0 4,3
  1339. .endif
  1340. .endm
  1341.  
  1342.  
  1343. .macro bltl
  1344. .ifeq $NARG-1
  1345.  bcl\0 12,0,\1
  1346. .else
  1347.  bcl\0 12,4*(\1)+0,\2
  1348. .endif
  1349. .endm
  1350.  
  1351. .macro blel
  1352. .ifeq $NARG-1
  1353.  bcl\0 4,1,\1
  1354. .else
  1355.  bcl\0 4,4*(\1)+1,\2
  1356. .endif
  1357. .endm
  1358.  
  1359. .macro beql
  1360. .ifeq $NARG-1
  1361.  bcl\0 12,2,\1
  1362. .else
  1363.  bcl\0 12,4*(\1)+2,\2
  1364. .endif
  1365. .endm
  1366.  
  1367. .macro bgel
  1368. .ifeq $NARG-1
  1369.  bcl\0 4,0,\1
  1370. .else
  1371.  bcl\0 4,4*(\1)+0,\2
  1372. .endif
  1373. .endm
  1374.  
  1375. .macro bgtl
  1376. .ifeq $NARG-1
  1377.  bcl\0 12,1,\1
  1378. .else
  1379.  bcl\0 12,4*(\1)+1,\2
  1380. .endif
  1381. .endm
  1382.  
  1383. .macro bnll
  1384. .ifeq $NARG-1
  1385.  bcl\0 4,0,\1
  1386. .else
  1387.  bcl\0 4,4*(\1)+0,\2
  1388. .endif
  1389. .endm
  1390.  
  1391. .macro bnel
  1392. .ifeq $NARG-1
  1393.  bcl\0 4,2,\1
  1394. .else
  1395.  bcl\0 4,4*(\1)+2,\2
  1396. .endif
  1397. .endm
  1398.  
  1399. .macro bngl
  1400. .ifeq $NARG-1
  1401.  bcl\0 4,1,\1
  1402. .else
  1403.  bcl\0 4,4*(\1)+1,\2
  1404. .endif
  1405. .endm
  1406.  
  1407. .macro bsol
  1408. .ifeq $NARG-1
  1409.  bcl\0 12,3,\1
  1410. .else
  1411.  bcl\0 12,4*(\1)+3,\2
  1412. .endif
  1413. .endm
  1414.  
  1415. .macro bnsl
  1416. .ifeq $NARG-1
  1417.  bcl\0 4,3,\1
  1418. .else
  1419.  bcl\0 4,4*(\1)+3,\2
  1420. .endif
  1421. .endm
  1422.  
  1423. .macro bunl
  1424. .ifeq $NARG-1
  1425.  bcl\0 12,3,\1
  1426. .else
  1427.  bcl\0 12,4*(\1)+3,\2
  1428. .endif
  1429. .endm
  1430.  
  1431. .macro bnul
  1432. .ifeq $NARG-1
  1433.  bcl\0 4,3,\1
  1434. .else
  1435.  bcl\0 4,4*(\1)+3,\2
  1436. .endif
  1437. .endm
  1438.  
  1439. .macro bltla
  1440. .ifeq $NARG-1
  1441.  bcla\0 12,0,\1
  1442. .else
  1443.  bcla\0 12,4*(\1)+0,\2
  1444. .endif
  1445. .endm
  1446.  
  1447. .macro blela
  1448. .ifeq $NARG-1
  1449.  bcla\0 4,1,\1
  1450. .else
  1451.  bcla\0 4,4*(\1)+1,\2
  1452. .endif
  1453. .endm
  1454.  
  1455. .macro beqla
  1456. .ifeq $NARG-1
  1457.  bcla\0 12,2,\1
  1458. .else
  1459.  bcla\0 12,4*(\1)+2,\2
  1460. .endif
  1461. .endm
  1462.  
  1463. .macro bgela
  1464. .ifeq $NARG-1
  1465.  bcla\0 4,0,\1
  1466. .else
  1467.  bcla\0 4,4*(\1)+0,\2
  1468. .endif
  1469. .endm
  1470.  
  1471. .macro bgtla
  1472. .ifeq $NARG-1
  1473.  bcla\0 12,1,\1
  1474. .else
  1475.  bcla\0 12,4*(\1)+1,\2
  1476. .endif
  1477. .endm
  1478.  
  1479. .macro bnlla
  1480. .ifeq $NARG-1
  1481.  bcla\0 4,0,\1
  1482. .else
  1483.  bcla\0 4,4*(\1)+0,\2
  1484. .endif
  1485. .endm
  1486.  
  1487. .macro bnela
  1488. .ifeq $NARG-1
  1489.  bcla\0 4,2,\1
  1490. .else
  1491.  bcla\0 4,4*(\1)+2,\2
  1492. .endif
  1493. .endm
  1494.  
  1495. .macro bngla
  1496. .ifeq $NARG-1
  1497.  bcla\0 4,1,\1
  1498. .else
  1499.  bcla\0 4,4*(\1)+1,\2
  1500. .endif
  1501. .endm
  1502.  
  1503. .macro bsola
  1504. .ifeq $NARG-1
  1505.  bcla\0 12,3,\1
  1506. .else
  1507.  bcla\0 12,4*(\1)+3,\2
  1508. .endif
  1509. .endm
  1510.  
  1511. .macro bnsla
  1512. .ifeq $NARG-1
  1513.  bcla\0 4,3,\1
  1514. .else
  1515.  bcla\0 4,4*(\1)+3,\2
  1516. .endif
  1517. .endm
  1518.  
  1519. .macro bunla
  1520. .ifeq $NARG-1
  1521.  bcla\0 12,3,\1
  1522. .else
  1523.  bcla\0 12,4*(\1)+3,\2
  1524. .endif
  1525. .endm
  1526.  
  1527. .macro bnula
  1528. .ifeq $NARG-1
  1529.  bcla\0 4,3,\1
  1530. .else
  1531.  bcla\0 4,4*(\1)+3,\2
  1532. .endif
  1533. .endm
  1534.  
  1535.  
  1536. .macro bltlrl
  1537. .ifeq $NARG-1
  1538.  bclrl\0 12,4*(\1)+0
  1539. .else
  1540.  bclrl\0 12,0
  1541. .endif
  1542. .endm
  1543.  
  1544. .macro blelrl
  1545. .ifeq $NARG-1
  1546.  bclrl\0 4,4*(\1)+1
  1547. .else
  1548.  bclrl\0 4,1
  1549. .endif
  1550. .endm
  1551.  
  1552. .macro beqlrl
  1553. .ifeq $NARG-1
  1554.  bclrl\0 12,4*(\1)+2
  1555. .else
  1556.  bclrl\0 12,2
  1557. .endif
  1558. .endm
  1559.  
  1560. .macro bgelrl
  1561. .ifeq $NARG-1
  1562.  bclrl\0 4,4*(\1)+0
  1563. .else
  1564.  bclrl\0 4,0
  1565. .endif
  1566. .endm
  1567.  
  1568. .macro bgtlrl
  1569. .ifeq $NARG-1
  1570.  bclrl\0 12,4*(\1)+1
  1571. .else
  1572.  bclrl\0 12,1
  1573. .endif
  1574. .endm
  1575.  
  1576. .macro bnllrl
  1577. .ifeq $NARG-1
  1578.  bclrl\0 4,4*(\1)+0
  1579. .else
  1580.  bclrl\0 4,0
  1581. .endif
  1582. .endm
  1583.  
  1584. .macro bnelrl
  1585. .ifeq $NARG-1
  1586.  bclrl\0 4,4*(\1)+2
  1587. .else
  1588.  bclrl\0 4,2
  1589. .endif
  1590. .endm
  1591.  
  1592. .macro bnglrl
  1593. .ifeq $NARG-1
  1594.  bclrl\0 4,4*(\1)+1
  1595. .else
  1596.  bclrl\0 4,1
  1597. .endif
  1598. .endm
  1599.  
  1600. .macro bsolrl
  1601. .ifeq $NARG-1
  1602.  bclrl\0 12,4*(\1)+3
  1603. .else
  1604.  bclrl\0 12,3
  1605. .endif
  1606. .endm
  1607.  
  1608. .macro bnslrl
  1609. .ifeq $NARG-1
  1610.  bclrl\0 4,4*(\1)+3
  1611. .else
  1612.  bclrl\0 4,3
  1613. .endif
  1614. .endm
  1615.  
  1616. .macro bunlrl
  1617. .ifeq $NARG-1
  1618.  bclrl\0 12,4*(\1)+3
  1619. .else
  1620.  bclrl\0 12,3
  1621. .endif
  1622. .endm
  1623.  
  1624. .macro bnulrl
  1625. .ifeq $NARG-1
  1626.  bclrl\0 4,4*(\1)+3
  1627. .else
  1628.  bclrl\0 4,3
  1629. .endif
  1630. .endm
  1631.  
  1632. .macro bltctrl
  1633. .ifeq $NARG-1
  1634.  bcctrl\0 12,4*(\1)+0
  1635. .else
  1636.  bcctrl\0 12,0
  1637. .endif
  1638. .endm
  1639.  
  1640. .macro blectrl
  1641. .ifeq $NARG-1
  1642.  bcctrl\0 4,4*(\1)+1
  1643. .else
  1644.  bcctrl\0 4,1
  1645. .endif
  1646. .endm
  1647.  
  1648. .macro beqctrl
  1649. .ifeq $NARG-1
  1650.  bcctrl\0 12,4*(\1)+2
  1651. .else
  1652.  bcctrl\0 12,2
  1653. .endif
  1654. .endm
  1655.  
  1656. .macro bgectrl
  1657. .ifeq $NARG-1
  1658.  bcctrl\0 4,4*(\1)+0
  1659. .else
  1660.  bcctrl\0 4,0
  1661. .endif
  1662. .endm
  1663.  
  1664. .macro bgtctrl
  1665. .ifeq $NARG-1
  1666.  bcctrl\0 12,4*(\1)+1
  1667. .else
  1668.  bcctrl\0 12,1
  1669. .endif
  1670. .endm
  1671.  
  1672. .macro bnlctrl
  1673. .ifeq $NARG-1
  1674.  bcctrl\0 4,4*(\1)+0
  1675. .else
  1676.  bcctrl\0 4,0
  1677. .endif
  1678. .endm
  1679.  
  1680. .macro bnectrl
  1681. .ifeq $NARG-1
  1682.  bcctrl\0 4,4*(\1)+2
  1683. .else
  1684.  bcctrl\0 4,2
  1685. .endif
  1686. .endm
  1687.  
  1688. .macro bngctrl
  1689. .ifeq $NARG-1
  1690.  bcctrl\0 4,4*(\1)+1
  1691. .else
  1692.  bcctrl\0 4,1
  1693. .endif
  1694. .endm
  1695.  
  1696. .macro bsoctrl
  1697. .ifeq $NARG-1
  1698.  bcctrl\0 12,4*(\1)+3
  1699. .else
  1700.  bcctrl\0 12,3
  1701. .endif
  1702. .endm
  1703.  
  1704. .macro bnsctrl
  1705. .ifeq $NARG-1
  1706.  bcctrl\0 4,4*(\1)+3
  1707. .else
  1708.  bcctrl\0 4,3
  1709. .endif
  1710. .endm
  1711.  
  1712. .macro bunctrl
  1713. .ifeq $NARG-1
  1714.  bcctrl\0 12,4*(\1)+3
  1715. .else
  1716.  bcctrl\0 12,3
  1717. .endif
  1718. .endm
  1719.  
  1720. .macro bnuctrl
  1721. .ifeq $NARG-1
  1722.  bcctrl\0 4,4*(\1)+3
  1723. .else
  1724.  bcctrl\0 4,3
  1725. .endif
  1726. .endm
  1727.  
  1728.  
  1729. .macro crset
  1730.  creqv \1,\1,\1
  1731. .endm
  1732.  
  1733. .macro crclr
  1734.  crxor \1,\1,\1
  1735. .endm
  1736.  
  1737. .macro crmove
  1738.  cror \1,\2,\2
  1739. .endm
  1740.  
  1741. .macro crnot
  1742.  crnor \1,\2,\2
  1743. .endm
  1744.  
  1745.  
  1746. .macro trap
  1747.  tw 31,0,0
  1748. .endm
  1749.  
  1750. .macro twlt
  1751.  tw 16,\1,\2
  1752. .endm
  1753.  
  1754. .macro twle
  1755.  tw 20,\1,\2
  1756. .endm
  1757.  
  1758. .macro tweq
  1759.  tw 4,\1,\2
  1760. .endm
  1761.  
  1762. .macro twge
  1763.  tw 12,\1,\2
  1764. .endm
  1765.  
  1766. .macro twgt
  1767.  tw 8,\1,\2
  1768. .endm
  1769.  
  1770. .macro twnl
  1771.  tw 12,\1,\2
  1772. .endm
  1773.  
  1774. .macro twne
  1775.  tw 24,\1,\2
  1776. .endm
  1777.  
  1778. .macro twng
  1779.  tw 20,\1,\2
  1780. .endm
  1781.  
  1782. .macro twllt
  1783.  tw 2,\1,\2
  1784. .endm
  1785.  
  1786. .macro twlle
  1787.  tw 6,\1,\2
  1788. .endm
  1789.  
  1790. .macro twlge
  1791.  tw 5,\1,\2
  1792. .endm
  1793.  
  1794. .macro twlgt
  1795.  tw 1,\1,\2
  1796. .endm
  1797.  
  1798. .macro twlnl
  1799.  tw 5,\1,\2
  1800. .endm
  1801.  
  1802. .macro twlng
  1803.  tw 6,\1,\2
  1804. .endm
  1805.  
  1806. .macro twlti
  1807.  twi 16,\1,\2
  1808. .endm
  1809.  
  1810. .macro twlei
  1811.  twi 20,\1,\2
  1812. .endm
  1813.  
  1814. .macro tweqi
  1815.  twi 4,\1,\2
  1816. .endm
  1817.  
  1818. .macro twgei
  1819.  twi 12,\1,\2
  1820. .endm
  1821.  
  1822. .macro twgti
  1823.  twi 8,\1,\2
  1824. .endm
  1825.  
  1826. .macro twnli
  1827.  twi 12,\1,\2
  1828. .endm
  1829.  
  1830. .macro twnei
  1831.  twi 24,\1,\2
  1832. .endm
  1833.  
  1834. .macro twngi
  1835.  twi 20,\1,\2
  1836. .endm
  1837.  
  1838. .macro twllti
  1839.  twi 2,\1,\2
  1840. .endm
  1841.  
  1842. .macro twllei
  1843.  twi 6,\1,\2
  1844. .endm
  1845.  
  1846. .macro twlgei
  1847.  twi 5,\1,\2
  1848. .endm
  1849.  
  1850. .macro twlgti
  1851.  twi 1,\1,\2
  1852. .endm
  1853.  
  1854. .macro twlnli
  1855.  twi 5,\1,\2
  1856. .endm
  1857.  
  1858. .macro twlngi
  1859.  twi 6,\1,\2
  1860. .endm
  1861.  
  1862. .macro tdlt
  1863.  td 16,\1,\2
  1864. .endm
  1865.  
  1866. .macro tdle
  1867.  td 20,\1,\2
  1868. .endm
  1869.  
  1870. .macro tdeq
  1871.  td 4,\1,\2
  1872. .endm
  1873.  
  1874. .macro tdge
  1875.  td 12,\1,\2
  1876. .endm
  1877.  
  1878. .macro tdgt
  1879.  td 8,\1,\2
  1880. .endm
  1881.  
  1882. .macro tdnl
  1883.  td 12,\1,\2
  1884. .endm
  1885.  
  1886. .macro tdne
  1887.  td 24,\1,\2
  1888. .endm
  1889.  
  1890. .macro tdng
  1891.  td 20,\1,\2
  1892. .endm
  1893.  
  1894. .macro tdllt
  1895.  td 2,\1,\2
  1896. .endm
  1897.  
  1898. .macro tdlle
  1899.  td 6,\1,\2
  1900. .endm
  1901.  
  1902. .macro tdlge
  1903.  td 5,\1,\2
  1904. .endm
  1905.  
  1906. .macro tdlgt
  1907.  td 1,\1,\2
  1908. .endm
  1909.  
  1910. .macro tdlnl
  1911.  td 5,\1,\2
  1912. .endm
  1913.  
  1914. .macro tdlng
  1915.  td 6,\1,\2
  1916. .endm
  1917.  
  1918. .macro tdlti
  1919.  tdi 16,\1,\2
  1920. .endm
  1921.  
  1922. .macro tdlei
  1923.  tdi 20,\1,\2
  1924. .endm
  1925.  
  1926. .macro tdeqi
  1927.  tdi 4,\1,\2
  1928. .endm
  1929.  
  1930. .macro tdgei
  1931.  tdi 12,\1,\2
  1932. .endm
  1933.  
  1934. .macro tdgti
  1935.  tdi 8,\1,\2
  1936. .endm
  1937.  
  1938. .macro tdnli
  1939.  tdi 12,\1,\2
  1940. .endm
  1941.  
  1942. .macro tdnei
  1943.  tdi 24,\1,\2
  1944. .endm
  1945.  
  1946. .macro tdngi
  1947.  tdi 20,\1,\2
  1948. .endm
  1949.  
  1950. .macro tdllti
  1951.  tdi 2,\1,\2
  1952. .endm
  1953.  
  1954. .macro tdllei
  1955.  tdi 6,\1,\2
  1956. .endm
  1957.  
  1958. .macro tdlgei
  1959.  tdi 5,\1,\2
  1960. .endm
  1961.  
  1962. .macro tdlgti
  1963.  tdi 1,\1,\2
  1964. .endm
  1965.  
  1966. .macro tdlnli
  1967.  tdi 5,\1,\2
  1968. .endm
  1969.  
  1970. .macro tdlngi
  1971.  tdi 6,\1,\2
  1972. .endm
  1973.  
  1974.  
  1975. .macro mtxer
  1976.  mtspr 1,\1
  1977. .endm
  1978.  
  1979. .macro mtlr
  1980.  mtspr 8,\1
  1981. .endm
  1982.  
  1983. .macro mtctr
  1984.  mtspr 9,\1
  1985. .endm
  1986.  
  1987. .macro mtdsisr
  1988.  mtspr 18,\1
  1989. .endm
  1990.  
  1991. .macro mtdar
  1992.  mtspr 19,\1
  1993. .endm
  1994.  
  1995. .macro mtdec
  1996.  mtspr 22,\1
  1997. .endm
  1998.  
  1999. .macro mtsdr1
  2000.  mtspr 25,\1
  2001. .endm
  2002.  
  2003. .macro mtsrr0
  2004.  mtspr 26,\1
  2005. .endm
  2006.  
  2007. .macro mtsrr1
  2008.  mtspr 27,\1
  2009. .endm
  2010.  
  2011. .macro mtsprg
  2012.  mtspr 272+(\1),\2
  2013. .endm
  2014.  
  2015. .macro mtasr
  2016.  mtspr 280,\1
  2017. .endm
  2018.  
  2019. .macro mtear
  2020.  mtspr 282,\1
  2021. .endm
  2022.  
  2023. .macro mttbl
  2024.  mtspr 284,\1
  2025. .endm
  2026.  
  2027. .macro mttbu
  2028.  mtspr 285,\1
  2029. .endm
  2030.  
  2031. .macro mtibatu
  2032.  mtspr 528+2*(\1),\2
  2033. .endm
  2034.  
  2035. .macro mtibatl
  2036.  mtspr 529+2*(\1),\2
  2037. .endm
  2038.  
  2039. .macro mtdbatu
  2040.  mtspr 536+2*(\1),\2
  2041. .endm
  2042.  
  2043. .macro mtdbatl
  2044.  mtspr 537+2*(\1),\2
  2045. .endm
  2046.  
  2047. .macro mtdabr
  2048.  mtspr 1013,\1
  2049. .endm
  2050.  
  2051. .macro mfxer
  2052.  mfspr \1,1
  2053. .endm
  2054.  
  2055. .macro mflr
  2056.  mfspr \1,8
  2057. .endm
  2058.  
  2059. .macro mfctr
  2060.  mfspr \1,9
  2061. .endm
  2062.  
  2063. .macro mfdsisr
  2064.  mfspr \1,18
  2065. .endm
  2066.  
  2067. .macro mfdar
  2068.  mfspr \1,19
  2069. .endm
  2070.  
  2071. .macro mfdec
  2072.  mfspr 22,\1
  2073. .endm
  2074.  
  2075. .macro mfsdr1
  2076.  mfspr \1,25
  2077. .endm
  2078.  
  2079. .macro mfsrr0
  2080.  mfspr \1,26
  2081. .endm
  2082.  
  2083. .macro mfsrr1
  2084.  mfspr \1,27
  2085. .endm
  2086.  
  2087. .macro mfsprg
  2088.  mfspr \1,272+(\2)
  2089. .endm
  2090.  
  2091. .macro mfasr
  2092.  mfspr \1,280
  2093. .endm
  2094.  
  2095. .macro mfear
  2096.  mfspr \1,282
  2097. .endm
  2098.  
  2099. .macro mftbl
  2100.  mftb \1,268
  2101. .endm
  2102.  
  2103. .macro mftbu
  2104.  mftb \1,269
  2105. .endm
  2106.  
  2107. .macro mfpvr
  2108.  mfspr \1,287
  2109. .endm
  2110.  
  2111. .macro mfibatu
  2112.  mfspr \1,528+2*(\2)
  2113. .endm
  2114.  
  2115. .macro mfibatl
  2116.  mfspr \1,529+2*(\2)
  2117. .endm
  2118.  
  2119. .macro mfdbatu
  2120.  mfspr \1,536+2*(\2)
  2121. .endm
  2122.  
  2123. .macro mfdbatl
  2124.  mfspr \1,537+2*(\2)
  2125. .endm
  2126.  
  2127. .macro mfdabr
  2128.  mfspr \1,1013
  2129. .endm
  2130.  
  2131.  
  2132. .macro nop
  2133.  ori 0,0,0
  2134. .endm
  2135.  
  2136. .macro li
  2137.  addi \1,0,\2
  2138. .endm
  2139.  
  2140. .macro lis
  2141.  addis \1,0,\2
  2142. .endm
  2143.  
  2144. .macro mr
  2145.  or \1,\2,\2
  2146. .endm
  2147.  
  2148. .macro mr.
  2149.  or. \1,\2,\2
  2150. .endm
  2151.  
  2152. .macro not
  2153.  nor \1,\2,\2
  2154. .endm
  2155.  
  2156. .macro not.
  2157.  nor. \1,\2,\2
  2158. .endm
  2159.  
  2160. .macro mtcr
  2161.  mtcrf 0xff,\1
  2162. .endm
  2163.  
  2164.